package com.java.demo.Controller;

import com.java.demo.Model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    @Autowired
    private User user;

    public void doMethod(){
        User user1 = user;
        System.out.println("UserController 修改之前 ：User -> " + user);
        user1.setName("如来佛祖");
        System.out.println("UserController 修改之后 ：User -> " + user);
    }


}
